import axios from 'axios'
const request = axios.create({
  //   baseURL: 'https://devapi.qweather.com',
  timeout: 5000
})
request.interceptors.request.use((config) => {
  return config
})
request.interceptors.response.use(
  (res) => {
    return res.data
  },
  () => {
    return Promise.reject(new Error('whoops'))
  }
)

export default request
